package com.zz.course;

import org.testng.annotations.Test;

public class TimeOutTest {


    @Test(timeOut = 5000) //单位是毫秒
    public void timeoutSuccess () {
        System.out.println("超时测试成功用例...");
        try {
            Thread.sleep(4000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    @Test(timeOut = 5000) //单位是毫秒
    public void timeoutFail () {
        System.out.println("超时测试失败用例...");
        try {
            Thread.sleep(6000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

}
